#pragma once

#include <cftf/timer/timer.h>
#include <cftf/mysql/dbpool.h>

namespace player
{

	class PlayerMgr;
	class Session
	{
	public:
		Session();
		bool Loading() { return loading_; }
		const std::shared_ptr<cftf::mysql::DataSet> GetDataSet(std::size_t idx) const;
		int GetSocketHandle() const { return socket_handle; }

	private:
		int socket_handle = 0;
		long long account_id = 0;
		bool loading_ = false;
		unsigned long long guid = 0;
		cftf::timer::TimerWp timer_wp;
		std::vector<std::shared_ptr<cftf::mysql::DataSet>> datasets;

	private:

		friend class PlayerMgr;
	};

}